package com.dingreading.cloud.soms.controller;

import com.dingreading.cloud.common.base.R;
import com.dingreading.cloud.soms.entity.BookLabel;
import com.dingreading.cloud.soms.service.BookLabelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/front/choiceBox")
@Api(tags = "门店-获取选择框数据")
public class FrontChoiceBoxController {

    @Resource
    private BookLabelService bookLabelService;


    @ApiOperation(value = "获取书籍分类数据")
    @PostMapping(value = "/getBookLabels", produces = "application/json; charset=UTF-8")
    public R<Object> getBookLabels(
    ) {
        List<BookLabel> all = bookLabelService.list();

        return R.ok(all);
    }

}
